package day05;//void无返回值，数据类型(int)(double)有返回值

public class MethodDemo {
    public static void main(String[] args) {
        /*say();
        say();
        System.out.println("继续执行...");
        sayHi("zhangsan");*/
        /*sayHello("小明",73);
        sayHello("李华",53);*/
        say();
        say("zhangsan");
        say("lisi",25);
        //say(3.5436)
        int king=say1();
        System.out.println(king);

    }
    public static void say(String name,int age){
       if(age>=60){//在某种特定条件下，提前结束方法
           return;//结束方法
       }
        System.out.println("大家好，我叫"+name+"今年"+age+"岁了");
    }


    public static void say(String name){
        System.out.println("大家好，我叫"+name+"今年40岁了");
    }

    public static void say(){
        System.out.println("大家好，我叫windy，今年21岁了");
    }

    public static void say(int age){}
    public static void say(int age,String name){}
    public static int say1(){return 1000;}
    //public static int say(){return 1000;}//编译错误，重载与返回值类型无关
    //public static int say(String address){}编译错误，重载与参数名称无关
}
